<?php
/*************************     公开配置信息     *************************/
define('BASEURL', '');
define('BASETPL', '');

// 网站目录结构
define("WEBSITE_ROOT", '/www/htdocs/appkfsy/');
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
    $web_log_path = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'logs' . DIRECTORY_SEPARATOR;
    if (!is_dir($web_log_path)) mkdir($web_log_path, 0755, true);
    define("WEB_LOGS_PATH", $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'logs' . DIRECTORY_SEPARATOR);
} else
{
    define("WEB_LOGS_PATH", "/mnt/logs/sql/");
}

// 数据库信息
// 读
define("DBR_DBNAME", 'kfsy_admin');
define("DBR_USERNAME", 'root');
define("DBR_PASSWORD", 'kfaha7102');//zhongjiamysql
/*define( "DBR_USERNAME",          'root');
define( "DBR_PASSWORD",          'root');//zhongjiamysql*/

//****START:多服务器连接参数分配****//
/*
if(!file_exists("mysql.conf.php"))
{
    file_put_contents("mysql.conf.php", "<?php \$mysqlnum=1;?>");    //把连接服务器改为第一台，为连接作准备
}
require("mysql.conf.php");    //载入代码
mysql_connect("192.168.1.{$mysqlnum}", "root", "password");
if($mysqlnum == 5)    //如果用了第五台服务器，下一次用第一台服务器
{
    $mysqlnum = 1;    
}
else
{
    $mysqlnum++;
}
$write_content="<?php \$mysqlnum=".$mysqlnum.";?>";
file_put_contents("mysql.conf.php", $write_content);    //重写文件
*/
//****END:多服务器连接参数分配****//

if (!defined('DBR_HOST') and !defined('DBR_PORT')) {
    define("DBR_HOST", '127.0.0.1');
    define("DBR_PORT", '3306');
} elseif (!defined('DBR_PORT'))   // 设置默认端口
{
    define("DBR_PORT", '3306');
}

// 写
define("DBW_DBNAME", 'kfsy_admin');
define("DBW_USERNAME", 'root');
define("DBW_PASSWORD", 'kfaha7102');
/*define( "DBW_USERNAME",          'root');
define( "DBW_PASSWORD",          'root');*/
define("DBW_HOST", '127.0.0.1');
define("DBW_PORT", '3306');

// 数据库连接串
//define( "DBR_URL",              'mysql://'.DBR_USERNAME.':'.DBR_PASSWORD.'@'.$dbr_host.'/'.DBR_DBNAME );
define("DBR_URL", 'mysql://' . DBR_USERNAME . ':' . DBR_PASSWORD . '@' . DBR_HOST . ':' . DBR_PORT . '/' . DBR_DBNAME);
define("DBW_URL", 'mysql://' . DBW_USERNAME . ':' . DBW_PASSWORD . '@' . DBW_HOST . ':' . DBW_PORT . '/' . DBW_DBNAME);

// 静态内容目录
define("BGSQL_BASE_DIR", '/mnt/bgsql/');

// memcache 相关设置
$memcache_hosts = array('sdb3' => '919', 'sdb2' => '919', 'f3' => '919');

$Redis_Memo['host'] = "r-2zeb3a2a96d4fb04.redis.rds.aliyuncs.com";
$Redis_Memo['port'] = "6379";
$Redis_Memo['user'] = "r-2zeb3a2a96d4fb04";
$Redis_Memo['pass'] = "Kfyao123456";

$Redis_Memo['host'] = "127.0.0.1";
$Redis_Memo['port'] = "6379";
$Redis_Memo['user'] = "";
$Redis_Memo['pass'] = "";

// LOG 文件设置
define('DB_ERROR_LOG', '/www/htdocs/logs/dbps_error.log');
define('GE_ERROR_LOG', '/www/htdocs/logs/geps_error.log');
define('DATA_FILE_ERROR', '/www/htdocs/logs/data_file_ps_error.log');

$SYS_PATH_MODULE = "/www/htdocs/appkfsy/modules/";

//网站根目录
$SYS_HOME_URL = 'https://zs.ueu.cn/';


//药店logo
$SHOP_LOGO = "https://appkfsypic.oss-cn-beijing.aliyuncs.com/2017092615263146540_700_700_.jpeg";

$defaultCategory = array(
    "2" => "口鼻咽喉",
    "3" => "清热解毒",
    "4" => "咳嗽气喘",
    "5" => "眼睛不适",
    "6" => "儿童用药",
    "7" => "皮肤用药",
    "8" => "睡眠调理",
    "9" => "跌打损伤",
    "10" => "外用消毒",
    "11" => "胃肠消化",
    "12" => "妇科用药",
    "13" => "男科用药",
    "14" => "滋补补益",
    "15" => "维矿物质",
    "16" => "泌尿感染",
    "17" => "心脑血管",
    "18" => "风湿骨痛"
);

//同步商品库存单次数量
$SyncProductStockLimit = 40;

//同步商品价格单次数量
$SyncProductPriceLimit = 40;
